package com.example;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

import javax.annotation.Resource;
import java.net.InetAddress;

@SpringBootApplication
@PropertySource("classpath:properties/wahoyu.properties")
public class OtaruApplication {


    public static void main(String[] args) {

        ConfigurableApplicationContext application = SpringApplication.run(OtaruApplication.class, args);
        Environment env = application.getEnvironment();
        String port = env.getProperty("server.port");
        System.out.println("SpringBoot v2.7.14 启动成功！");
        System.out.println("运行端口:" + port);

    }
}
